home *** CD-ROM | disk | FTP | other *** search
/ The Sunday Times: The Month 2004 August / The Sunday Times - The Month 2004-08.iso / pc / engine / modules / pa_search.swf / scripts / frame_1 / DoAction.as
Encoding:
Text File  |  2004-07-07  |  1.1 KB  |  40 lines

  1. function init()
  2. {
  3.    play();
  4. }
  5. function openSearchPage(linktoSend)
  6. {
  7.    Tardis.webPageOpen(linktoSend);
  8. }
  9. function submitListing()
  10. {
  11. }
  12. function submitForm()
  13. {
  14.    var dateQuery = "&dd=" + dayMC.optionValue + "&mm=" + monthMC.optionValue + "&yy=" + yearMC.optionValue;
  15.    var _loc1_ = "";
  16.    var _loc3_ = "";
  17.    var titleQuery = "";
  18.    var runQuery = "&period=" + periodSelectMC.optionValue;
  19.    if(eventSelectorMC.optionValue != null)
  20.    {
  21.       _loc1_ = "&type=" + eventSelectorMC.optionValue;
  22.    }
  23.    if(venueMC.searchFF != venueMC.defaultValue && venueMC.searchFF != "")
  24.    {
  25.       _loc3_ = "&venue=" + escape(venueMC.searchFF);
  26.    }
  27.    if(titleMC.searchFF != titleMC.defaultValue && titleMC.searchFF != "")
  28.    {
  29.       titleQuery = "&title=" + escape(titleMC.searchFF);
  30.    }
  31.    if(townMC.searchFF != townMC.defaultValue && townMC.searchFF != "")
  32.    {
  33.       locationQuery = "&location=" + escape(townMC.searchFF);
  34.    }
  35.    var _loc2_ = "http://themonth.ents24.com/result.php?" + dateQuery + _loc1_ + _loc3_ + titleQuery + locationQuery + runQuery;
  36.    trace(_loc2_);
  37.    openSearchPage(_loc2_);
  38. }
  39. onReady();
  40.